libxc: fix xc_dom_load_elf_symtab
authorRoger Pau Monne <roger.pau@citrix.com>
Thu, 11 Jun 2015 16:05:20 +0000 (18:05 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 17 Jun 2015 10:57:39 +0000 (11:57 +0100)
commit06ee606aaf976ea653840b8a7ee3d424fb765f32
tree89800f990f5b0cfe575c438a8634d90ad2e65566
parent415b58c184b483ee31811a22d31bebcbb34b159c
libxc: fix xc_dom_load_elf_symtab

xc_dom_load_elf_symtab was incorrectly trying to perform the same
calculations already done in elf_parse_bsdsyms when load == 0 is used.
Instead of trying to repeat the calculations, just trust what
elf_parse_bsdsyms has already accounted for.

This also simplifies the code by allowing the non-load case to return
earlier.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/xc_dom_elfloader.c